/*
 * @Description: 
 * @Author: charles
 * @Date: 2021-11-15 16:07:55
 * @LastEditors: charles
 * @LastEditTime: 2021-11-15 16:14:30
 */
import {takeEvery,put} from 'redux-saga/effects'
import axios from 'axios'
function* loadArticles(){
  let url = "http://121.199.29.84:8002/index/pageQueryArticles"
  let params = {page:1,pageSize:10}
  let resp = yield axios.get(url,{params});
  //调用同步reducer
  yield put({type:"REFRESH_ARTICLES",payload:resp.data.data})
}

export default function* (){
  yield takeEvery('loadArticles',loadArticles)
}